Simulation 2

Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(-15 - 4W + 5A + Z(10 + 5W + 2AW))]\)
##        W                  A                Z                Y         
##  Min.   :-3.73508   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.64589   1st Qu.:0.6136   1st Qu.:0.0000   1st Qu.:0.0000  
##  Median : 0.02644   Median :2.0483   Median :0.0000   Median :0.0000  
##  Mean   : 0.01805   Mean   :2.1412   Mean   :0.4871   Mean   :0.4435  
##  3rd Qu.: 0.69708   3rd Qu.:3.4273   3rd Qu.:1.0000   3rd Qu.:1.0000  
##  Max.   : 3.88609   Max.   :5.0000   Max.   :1.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.493   2.896   2.773   4.225   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.826   2.253   2.275   3.572   5.000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.4018  1.8412  1.9875  3.1971  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.367   1.598   2.682   5.000

n = 200

CV HAL

results

## CV selected lambda (from one sample): 0.00342499231220454

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00387846621405548
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 0.000799982807508477
##  which is 0.233572146909012 * lambda_CV

1000 repetition

## The average of unsersmoothed lambda (from 1000 sample): 0.000851942858017283
##  which is 0.217778357408167 * the average of 1000 lambda_CV
## z=1:

## z=0:

CV vs Undersmoothing

## z=1:

## z=0:

Oevr a grid of lambda scalers

n = 500

CV HAL

results

## CV selected lambda (from one sample): 0.0016481890921567

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00184274700569968
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 0.000267629110962862
##  which is 0.162377673918872 * lambda_CV

1000 repetition

## The average of unsersmoothed lambda (from 1000 sample): 0.000393879557187377
##  which is 0.213589118948609 * the average of 1000 lambda_CV
## z=1:

## z=0:

CV vs Undersmoothing

## z=1:

## z=0:

Oevr a grid of lambda scalers

n = 1000

CV HAL

results

## CV selected lambda (from one sample): 0.00066416866564044

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00100946359885929
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 0.000320988082768554
##  which is 0.483293023857175 * lambda_CV

1000 repetition

## The average of unsersmoothed lambda (from 1000 sample): 0.000229565022553988
##  which is 0.227979662379109 * the average of 1000 lambda_CV
## z=1:

## z=0:

CV vs Undersmoothing

## z=1:

## z=0:

Oevr a grid of lambda scalers